<?php
class Sosweb_View_Helper_HeaderBanner
{
	public function headerBanner($baseUrl, $img1 = null, $img2 = null, $alt1 = null, $alt2 = null)
	{
		$img1_size = null;
		$img2_size = null;
		
		if ($img1 != null)
			$img1_size = getimagesize('http://'.$_SERVER['HTTP_HOST'].$baseUrl.$img1);
		
		if ($img2 != null)
			$img2_size = getimagesize('http://'.$_SERVER['HTTP_HOST'].$baseUrl.$img2);
		
		$html =
			' <table class="fullH"> '.
			'  <tr> '.
			'   <td class="headerBannerCell1"> '.
			'    <img src="'.$baseUrl.'/public/images/arrow_big.png" alt="Nauka Jazdy Bydgoszcz" /> '.
			'   </td> '.
			'   <td class="headerBannerCell2"> '.
			($img1 != null ? '<img src="'.$baseUrl.$img1.'" alt="'.$alt1.'" width="'.$img1_size[0].'" height="'.$img1_size[1].'" /> ' : '').
			'   </td> '.
			'   <td class="headerBannerCell3"> '.
			($img2 != null ? '<img src="'.$baseUrl.$img2.'" alt="'.$alt2.'" width="'.$img2_size[0].'" height="'.$img2_size[1].'" /> ' : '').
			'   </td> '.
			'  </tr> '.
			' </table> ';
		
		return $html;
	}
}